import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
type int = number;
//class SEntityId
// did
export class SEntityId extends IMessageBase {
  constructor(arg1: Boolean = false) {
    
    super();if (arg1) {
      MessageManager.instance().regist(this);
    }
    return;
  }

  public /* override */ getType(): int {
    return this._type;
  }

  public /* override */ clone(): IMessageBase {
    return new SEntityId();
  }

  public /* override */ __write(arg1: SerializeStream): void {
    arg1.writeByte(this.type);
    arg1.writeShort(this.typeEx);
    arg1.writeByte(this.typeEx2);
    arg1.writeInt(this.id);
    return;
  }

  public /* override */ __read(arg1: SerializeStream): void {
    this.type = arg1.readByte();
    this.typeEx = arg1.readShort();
    this.typeEx2 = arg1.readByte();
    this.id = arg1.readInt();
    return;
  }

  public /* const */ _type: int = 1;

  public /* var */ type!: int;

  public /* var */ typeEx!: int;

  public /* var */ typeEx2!: int;

  public /* var */ id!: int;

  public static /* var */ _regist: SEntityId = new SEntityId(true);
}
